<?php if(!defined('BASEPATH')) exit ('No direct script access allowed');
class My_added extends public_controller
{
	public function __construct() {
		parent:: __construct();

		$this->load->model('person/person_model');
		if(!$this->session->userdata('loginStatus')) redirect('landing');
	}

	public function index(){

		//Get list dead people by me
		$sql = $this->db->select('id,name, country, state, age, photo_cover')->get_where('person', array('member_id' => $this->session->userdata('sess_memId')))->result_array();

		$this->template->title('Death', 'My added dead people')
			->set('peoples', $sql)
			->build('my_added/index');	
	}

	function test() {
		$video = "http://www.youtube.com/watch?v=HzZ_urpj4As";
		$fix = str_replace("watch?v=", "v/", $video);
		echo $fix;
	}
}